import java.util.LinkedList;


public class Set<E> {
	
	
	private LinkedList<E> list;
	
	private LinkedList<E> getList() {
		return list;
	}
	
	private void setList(LinkedList<E> list)
	{
		this.list = list;
	}
	
	public Set()
	{
		this.setList(new LinkedList<E>());
	}

	public static void main(String[] args) {
		
		Set set = new Set<Integer>();
		for (int i = 0; i < 5; i++) {
			System.out.println(set.add(i));
		}
		
		for (int i = 0; i < 10; i++) {
			System.out.println(set.add(i));
		}
		
		for (int i = 3; i < 6; i++) {
			System.out.println(set.remove(i));
		}
		
		for (int i = 8; i < 13; i++) {
			System.out.println(set.remove(i));
		}
		
	}
	
	
	
	public boolean add(E element)
	{
		if (!this.getList().contains(element))
		{
			this.getList().add(element);
			return true;
		}
		else
			return false;
	}
	
	public boolean contains(E element)
	{
		return this.getList().contains(element);
	}
	
	public boolean remove(E element)
	{
		if (this.getList().contains(element))
		{
			this.getList().remove(element);
			return true;
		}
		
		return false;
	}

	
	

	
}
